public class Solution {
    //消失的数字
    public int missingNumber(int[] nums) {

        int ret = 0;
        for (int i = 0; i < nums.length; i++) {
            ret = nums[i] ^ ret;
        }
        for (int i = 0; i < nums.length + 1; i++) {
            ret = ret ^ i;
        }
        return ret;

    }
}
